Patient Segmentation Process API - Implementation Template
Setup guide
Importing Templates into Anypoint Studio
- In Studio, click the Exchange X icon in the upper left of the taskbar.
- Log in with your Anypoint Platform credentials.
- Search for the template.
- Click Open.
Running Templates in Anypoint Studio
After you import your template into Studio, follow these configuration steps to run it.
Common Configuration
mule.env- sets the environment where the application is to be deployed. It should be configured inconfig-<mule.env>.yamlfile. For a studio deployment, the recommended mule.env value islocal.mule.key- sets the encryption password to be used for encrypting secure properties. Update as needed.api.autodiscoveryIDshould be configured inconfig-<mule.env>.yamlfile.
Please refer to the attached link on how to secure the configuration properties.
Patient Segmentation Process API Configuration
The application requires a few things to be configured such as SFTP and external services connection information. Configure them in the properties file located in the config/properties folder.
SFTP Configuration
This application using a public key as the preferred authentication method in SFTP configuration and uses a PEM (Privacy Enhanced Mail) format certificate.
sftp.hostshould be configured inconfig-<mule.env>.yamlfile.sftp.portshould be configured inconfig-<mule.env>.yamlfile.sftp.usernameshould be configured inconfig-<mule.env>.yamlfile.sftp.keypairFilePath- sets the path to the keypair file. Key file should be available in /src/main/resources. It should be configured inconfig-<mule.env>.yamlfile.
Please refer to the attached link on how to Configure a Public Key to Connect to an SFTP Server.
Salesforce CDP System API
cdp-sys-api.hostshould be configured inconfig-<mule.env>.yamlfile. The API host.cdp-sys-api.portshould be configured inconfig-<mule.env>.yamlfile. The API port.cdp-sys-api.basepathshould be configured inconfig-<mule.env>.yamlfile. The API base path.cdp-sys-api.responseTimeoutshould be configured inconfig-<mule.env>.yamlfile. The connection response timeout.cdp-sys-api.reconnection.frequencyshould be configured inconfig-<mule.env>.yamlfile. The reconnection frequency.cdp-sys-api.reconnection.attemptsshould be configured inconfig-<mule.env>.yamlfile. The reconnection attempts.
Azure Patient Engagement System API
azure-patient-engmt-sys-api.hostNameshould be configured inconfig-<mule.env>.yamlfile. The API host.azure-patient-engmt-sys-api.portshould be configured inconfig-<mule.env>.yamlfile. The API port.azure-patient-engmt-sys-api.basepathshould be configured inconfig-<mule.env>.yamlfile. The API base path.azure-patient-engmt-sys-api.responseTimeoutshould be configured inconfig-<mule.env>.yamlfile. The connection response timeout.azure-patient-engmt-sys-api.reconnection.frequencyshould be configured inconfig-<mule.env>.yamlfile. The reconnection frequency.azure-patient-engmt-sys-api.reconnection.attemptsshould be configured inconfig-<mule.env>.yamlfile. The reconnection attempts.
Source system data loads
This Process API interacts with multiple systems. Since the format to load data in to each of the systems is different, a set of sample data files have been provided for reference.
Refer the sample data format files available under src/test/samples
- Immunizations_Sample.csv - Sample file that describes the structure of the patient immunizations.
- Conditions_Sample.csv - Sample file that describes the structure of the patient conditions.
Tested and verified
This solution was developed and tested on Anypoint Studio 7.15 and Mule Runtime 4.4.0.
Run the application
- Right-click the template project folder.
- Hover your mouse over 'Run as'.
- Click Mule Application (configure).
- Inside the dialog, select Environment and set the variable
mule.envto the appropriate value (dev or local). - Inside the dialog, select Environment and set the variable key to the property encryption key that you used to encrypt your secure properties.
- Click Run.
Deployment instructions for CloudHub using provided scripts
Ensure the Maven profile CloudHub-HLS-DEV has been properly configured in your settings.xml file. Reference can be found by downloading the Accelerator Common Resources asset. Additional instructions are available in the Getting Started with MuleSoft Accelerators - Build Environment guide.
Update the config-<env>.yaml properties appropriately and then use one of the following scripts to deploy the application to CloudHub:
- packageDeploy.sh (Mac/Linux).
- packageDeploy.cmd (Windows).